package cz.cvut.fit.web.nakupniSeznam.ws.conv;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import cz.cvut.fit.web.nakupniSeznam.data.Item;

@XmlRootElement(name="item")
@XmlType(propOrder = {"id", "mobileId", "name", "listId", "unitId", "categoryId", "quantity", "lastPicked", "lastChanged", "creationDate", "marked"})
public class ItemConverter {
	
	public ItemConverter() {
		this.item = new Item();
		this.mobileId = null;
		
	}
	
	public ItemConverter(Item item) {
		super();
		this.item = item;
		this.mobileId = null;
	}
	
	private Item item;
	private Integer mobileId;

	@XmlElement
	public Long getId() {
		return this.item.getId();
	}

	@XmlElement
	public Integer getMobileId() {
		return this.mobileId;
	}
	

	@XmlElement
	public String getName() {
		return this.item.getName();
	}

	@XmlElement
	public Integer getQuantity() {
		return this.item.getQuantity();
	}

	@XmlElement
	public Long getCreationDate() {
		return this.item.getCreationDate();
	}

	@XmlElement
	public Long getLastChanged() {
		return this.item.getLastChanged();
	}

	@XmlElement
	public Long getLastPicked() {
		return this.item.getLastPicked();
	}
	
	@XmlElement
	public Long getCategoryId() {
		return this.item.getCategoryId();
	}

	@XmlElement
	public Long getUnitId() {
		return this.item.getUnitId();
	}

	@XmlElement
	public Long getListId() {
		return this.item.getListId();
	}

	@XmlElement
	public Integer getMarked() {
		return this.item.getMarked();
	}

	public Item retrieveRepresentation() {
		return item;
	}
	
	public void setMarked(Integer marked) {
		this.item.setMarked(marked);
	}
	
	public void setListId(Long listId) {
		this.item.setListId(listId);
	}
	
	public void setUnitId(Long unitId) {
		this.item.setUnitId(unitId);
	}
	
	public void setCategoryId(Long categoryId) {
		this.item.setCategoryId(categoryId);
	}
	
	public void setLastPicked(Long lastPicked) {
		this.item.setLastPicked(lastPicked);
	}
	
	public void setLastChanged(Long lastChanged) {
		this.item.setLastChanged(lastChanged);
	}
	
	public void setCreationDate(Long creationDate) {
		this.item.setCreationDate(creationDate);
	}
	
	public void setQuantity(Integer quantity) {
		this.item.setQuantity(quantity);
	}
	
	public void setName(String name) {
		this.item.setName(name);
	}
	
	public void setMobileId(Integer mobileId) {
		this.mobileId = mobileId;
	}
	
	public void setId(Long id) {
		this.item.setId(id);
	}
}
